#include <iostream>
#include <thread>

using namespace std;

void f(int z){
    for(int i=0;i<z;i++){
        cout<<"function called\n";
    }
}

class thread_obj{
    public:
        void operator()(int x){
            for(int i=0;i<x;i++){
                cout<<"class called\n";
            }
        }
};

int main(){
    thread th1(f,3);
    thread th2(thread_obj(),3);
    auto f=[](int x){
        for(int i=0;i<x;i++){
            cout<<"lambda called\n";
        }
    };
    thread th3(f,3);
    th1.join();
    th2.join();
    th3.join();
    return 0;
}
